package kr.hkit.powerjava.chapter20;

class Super {
	int n = 1;
	public int getN() {
		return n;	
	}
}

class Sub extends Super {
	int n =10;
	
	public int getN() {
		return n;
	}
	
	public int getSuperN() {
		return super.getN();
	}
}

public class example01 {
	public static void main(String[] args) {
		Super sup = new Sub();
		System.out.println(sup.getN());
		System.out.println(sup.n);
		System.out.println(((Sub)sup).n);
		System.out.println(((Sub)sup).getSuperN());

	}
}
